/**
 * @file user_data.h
 * @brief 
 * 
 * @author dalin (dalin@robot.com)
 * @version 1.0
 * @date 2023-05-08
 * 
 * @copyright Copyright (c) 2023  OpenSir Tech.co, Ltd
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2023-05-08 <td>1.0     <td>dalin     <td>内容
 * </table>
 */

#ifndef USER_DATA_H_
#define USER_DATA_H_
#include <stdint.h>

/************************************ 四级变量 ************************************/



/************************************ 三级变量 ************************************/
/******************  ******************/
typedef struct TASKCOUNT_
{
    uint32_t control_cnt;
    uint32_t commun_cnt;
    uint32_t sensor_cnt;
    uint32_t exception_cnt;
    uint32_t display_cnt;
    uint32_t idle_cnt;
    uint32_t btest_cnt;
}taskCnt_t;

/* 传感器 */
typedef struct
{
	uint8_t state;

}adcSensor_t;




/************************************ 二级变量 ************************************/

typedef struct
{
    adcSensor_t adc;
}devSensor_t;

/* 系统数据 */
typedef struct
{
    taskCnt_t task_cnt;

}systemData_t;


/* 设备控制 */
typedef struct
{
	uint8_t state;

}devControl_t;

/************************************ 一级变量 ************************************/
/* 一级变量 */
typedef struct USERDATA_
{
    systemData_t    sys;
    devSensor_t     sensor;
    devControl_t    ctrl;

    float           vofa_buf[20];
}userData_t;


extern userData_t  udata;


#endif /* USER_DATA_H_ */
